Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
# Check this machine is OK for building on.
.PHONY: check-build
check-build:
- LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk build
+ PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk build
# Check this machine is OK for installing on.
.PHONY: check-install
check-install:
- LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk install
+ PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk install
.PHONY: clean
clean:
. ./funcs.sh
-python -c '
+if test -z ${PYTHON}; then
+ PYTHON=`/usr/bin/env python 2>/dev/null`
+fi
+
+${PYTHON} -c '
import sys
sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 2)
' || fail "need python version >= 2.2"
. ./funcs.sh
-python -c '
+if test -z ${PYTHON}; then
+ PYTHON=`/usr/bin/env python 2>/dev/null`
+fi
+has_or_fail ${PYTHON}
+
+${PYTHON} -c '
import os.path, sys
for p in sys.path:
if os.path.exists(p + "/config/Makefile"):
. ./funcs.sh
-python -c 'import xml.dom.minidom' 2>/dev/null || \
+if test -z ${PYTHON}; then
+ PYTHON=`/usr/bin/env python 2>/dev/null`
+fi
+has_or_fail ${PYTHON}
+
+${PYTHON} -c 'import xml.dom.minidom' 2>/dev/null || \
fail "can't import xml.dom.minidom"